/************************************************
 * Author       :   XXY
 * Blog         :   https://www.cnblogs.com/jzyl
 * Gitee        :   https://gitee.com/xiaobaichong
 * Email        :   1047185209@QQ.com
 * FileName     :   EnumUtility.cs
 * CreateData   :   2023/5/30 15:10:37
 * UnityVersion :   2021.3.20f1c1
 * Description  :   枚举工具类(带有[Flags]标识的枚举)
************************************************/

using System;

namespace Main
{
    public static class EnumUtility
    {
        /// <summary>
        /// 枚举a添加枚举b
        /// </summary>
        public static int Add(int a, int b)
        {
            return a | b;
        }
        /// <summary>
        /// 枚举a移除枚举b
        /// </summary>
        public static int Sub(int a, int b)
        {
            return a ^ b;
        }
        /// <summary>
        /// 枚举a是否包含枚举b
        /// </summary>
        public static bool Has(int a, int b)
        {
            return (a & b) == b;
        }
    }
}
